package org.example.springioc.configuration;

import org.example.springioc.model.UserObject;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:38917
 * Date:2025/4/21
 * Time:19:01
 */
@Configuration
public class UserConfiguration {
    @Bean
    public UserObject getUserObject1() {
        return new UserObject();
    }
    @Primary
    @Bean
    public UserObject getUserObject2() {
        return new UserObject("李四");
    }
    @Bean
    public UserObject getUserObject3() {
        return new UserObject("王五",18,102);
    }
    @Bean
    public UserObject getUserObject4(){
        return new UserObject("张三",18);
    }
}
